import { httpGet, httpPost, httpDelete, httpPut } from '@/http'
import { services } from '@/config'

export const getPage = data => httpPost(`{{template serviceName}}{{requestPath}}/page`, data)

export const save = data => httpPost(`{{template serviceName}}{{requestPath}}`, data)

export const load = id => httpGet(`{{template serviceName}}{{requestPath}}/${id}`)

export const create = () => httpGet(`{{template serviceName}}{{requestPath}}/create`)

export const update = data => httpPut(`{{template serviceName}}{{requestPath}}`, data)

export const batchDelete = ids => httpDelete(`{{template serviceName}}{{requestPath}}/batchDelete`, ids, null, false)
